{% extends "base.html" %}

{% block header%}
<title>项目配置编辑</title>
{% endblock %}

{% block content %}
{% with model_name='Branch' url_prefix='/pack/branch/branch' %}
<div class="bar">
	<a>项目管理</a> -> 项目配置编辑
	<div class="buttons">
		<a  class="btn btn-app btn-grey btn-xs radius-4 pull-right submit"  />保存</a>
	</div>
</div>

<form action="{{url_prefix}}?id={{model.id}}" method="post">
	<table class="form2">
    <tr>
        <th>项目名称：</th>
        <td>
            <select id="pro_tuple_select" name="project">
                {% for id, name in pro_tuple %}
                    <option value="{{id}}" {% if model.project == id %}selected="selected"{% endif %}>{{name}}</option>
                {% endfor %}
            </select>
        </td>
	</tr>
	<tr>
        <th>前置分支名称：</th>
        <td>
            <select id="bra_tuple_select" name="prev_branch">
                    <option {% if not model.prev_branch %}selected="selected"{% endif %}>无</option>
                {% for id, name in bra_tuple %}
                    <option value="{{id}}" {% if model.prev_branch == id %}selected="selected"{% endif %}>{{name}}</option>
                {% endfor %}
            </select>
        </td>
	</tr>
	<tr>
		<th>分支名称：</th>
        <td>
            <input type="text" name="branch_name" value="{{model.branch_name}}" required="required"/>
        </td>
	</tr>
	<tr>
        <th>状态:</th>
        <td>
            <select id="state_type_select" name="state">
                {% for v,n in state_type %}
                    <option value="{{v}}" {% if model.state == v %}selected="selected"{% endif %}>{{n}}</option>
                {% endfor %}
            </select>
        </td>
    </tr>
</table>
</form>
{% endwith %}
{% endblock %}